package com.demo.jpa.service;

import com.demo.jpa.dao.entity.UserEntity;
import com.demo.jpa.dao.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;

/**
 * @Author:liaoyoule
 * @Description
 * @Date: Created in 15:54 2018/7/20
 * @Modifyied By:
 */
@Service
public class UserService {
    @Autowired
    private UserRepository userRepository;

    public List<UserEntity> findAll() {
        return userRepository.findAll();
    }

    public static void main(String[] args) {
        File file = new File("I:\\tt.txt");
        boolean readable = file.setReadable(true, false);
        System.err.println(readable);
    }
}
